
public class TestDemo {
    public static boolean find3(int[] array){
        for (int i = 0; i < array.length-3; i++) {
            if(array[i] % 2 == 1 && array[i+1] % 2 == 1 && array[i+2] % 2 == 1){
                return true ;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[] arr = {1,2,34,3,4,9,5,23,12};
        System.out.println(find3(arr));
    }
    public  static void find2(int[] array){
        int L = array.length / 2;
        int count = 0;
        for (int i = 0; i <array.length ; i++) {
            for (int j = 0; j < array.length; j++) {
                if(array[i] == array[j]){
                    count++;
                }
            }
            if(count > L){
                System.out.println(array[i]);
                break;
            }
        }

    }
    public static void main3(String[] args) {
        int[] array = {1,1,2};
       find2(array);
    }
    public static int find(int[] array){
        int result = array[0];
        for (int i = 1; i < array.length ; i++) {
            result =result ^ array[i];
        }
        return result;
    }

    public static void main1(String[] args) {
       int[] array = {2,3,2,3,1,4,4};
        System.out.println(find(array));    }

}
